package com.fang.db.dynamicdatasource02rwseparation.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.fang.db.dynamicdatasource02rwseparation.contant.DBConstants;
import com.fang.db.dynamicdatasource02rwseparation.entity.OrderDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * @Description
 * @Author Bernie_fang
 * @Date 2022/12/18 22:20
 **/
@Repository
@Mapper
public interface OrderMapper {

    @DS(DBConstants.DATASOURCE_SLAVE)
    OrderDO selectById(@Param("id") Integer id);

    @DS(DBConstants.DATASOURCE_MASTER)
    int insert(OrderDO entity);

}
